package lib

func init() {
	Probs = append(Probs, Problem{
		Num:         190,
		Discription: "二进制位高低互换",
		Level:       1,
		Labels: map[string]int{
			"位运算": 1,
		},
	})
}

func ReverseBits(num uint32) uint32 {
	res := uint32(0)
	for i := 0; i <= 31; i++ {
		last := num & 1
		res = res<<1 + last
		num >>= 1
	}
	return res
}
